<template>
  <div>
    <div class="tag">
      <el-table :data="tableData" @row-click='jumpTwo' style="width: 100%" size="medium">
        <el-table-column label="分类">
          <template slot-scope="scope">
            <i class="el-icon-folder-opened"></i>
            <span style="margin-left: 10px" >{{ scope.row.name }}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    this.seek();
    this.listName();
  },

  methods: {
    seek() {
      this.$emit("back", [false, false]);
    },
    // jump(v){
    //   // console.log(v)
    //   this.jumpTwo(v);
    // },
    jumpTwo(a) {
      this.$router.push({
        name: "twoChild", //用params时此处只能用name跳转
        query: {
          list: a,
        },
      });
    },
    listName() {
      this.$axios
        .post("http://47.104.167.34:9110/api/category/list")
        .then((res) => {
          this.tableData = res.data.data;
          console.log(res, "3336666");
        });
    },
  },
};
</script>

<style scoped>
</style>